package com.zkthink.ceres.order.util;

import com.zkthink.base.R;
import com.zkthink.ceres.order.entity.Order;
import lombok.AllArgsConstructor;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;


/**
 * 余额创建流水
 */
@Component
@AllArgsConstructor
public class CreateBalanceJournalEvemtUtil {

    private ApplicationEventPublisher publisher;

    public R<Boolean> createBalanceJournal(Order order) {
        publisher.publishEvent(order);
        return R.success();
    }
}
